import request from "@/api/request.js"

function findCategory(id){
	return request({
		url:`/lejuClient/productCategory/findCategory/${id}`,
		method:"get"
	})
}


function findProductList(start,limit,data){
	return request({
		url:`/lejuClient/product/findProductList/${start}/${limit}`,
		data:data,
		method:"POST"
	})
}
// 商品详情
function productDetail(id){
	return request({
		url:`/lejuClient/product/productDetail/${id}`,
		method:'GET'
	})
}
// 添加购物车
function addCart(data){
	return request({
		url:`/lejuClient/cart/addCart`,
		method:"post",
		data
	})
}
//立即购买
function addPreOrder(data){
	return request({
		url:`/lejuClient/order/addPreOrder`,
		method:"post",
		data
	})
}
export {
	findCategory,
	findProductList,
	productDetail,
	addCart,
	addPreOrder
}